home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / command.h.z / command.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.8 KB  |  103 lines

  1. /* $Id: command.h,v 1.21 1999/02/23 11:42:49 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_COMMAND_H__
  25. #define __GLIBTOP_COMMAND_H__
  26.  
  27. #include <glibtop.h>
  28. #include <glibtop/sysdeps.h>
  29. #include <glibtop/union.h>
  30.  
  31. BEGIN_LIBGTOP_DECLS
  32.  
  33. #define GLIBTOP_CMND_QUIT        0
  34. #define GLIBTOP_CMND_SYSDEPS        1
  35.  
  36. #define GLIBTOP_CMND_CPU        2
  37. #define GLIBTOP_CMND_MEM        3
  38. #define GLIBTOP_CMND_SWAP        4
  39. #define GLIBTOP_CMND_UPTIME        5
  40. #define GLIBTOP_CMND_LOADAVG        6
  41. #define GLIBTOP_CMND_SHM_LIMITS        7
  42. #define GLIBTOP_CMND_MSG_LIMITS        8
  43. #define GLIBTOP_CMND_SEM_LIMITS        9
  44. #define GLIBTOP_CMND_PROCLIST        10
  45.  
  46. #define GLIBTOP_CMND_PROC_STATE        11
  47. #define GLIBTOP_CMND_PROC_UID        12
  48. #define GLIBTOP_CMND_PROC_MEM        13
  49. #define GLIBTOP_CMND_PROC_TIME        14
  50. #define GLIBTOP_CMND_PROC_SIGNAL    15
  51. #define GLIBTOP_CMND_PROC_KERNEL    16
  52. #define GLIBTOP_CMND_PROC_SEGMENT    17
  53. #define GLIBTOP_CMND_PROC_ARGS        18
  54. #define GLIBTOP_CMND_PROC_MAP        19
  55.  
  56. #define GLIBTOP_CMND_MOUNTLIST        20
  57. #define GLIBTOP_CMND_FSUSAGE        21
  58. #define GLIBTOP_CMND_NETLOAD        22
  59. #define GLIBTOP_CMND_PPP        23
  60.  
  61. #define GLIBTOP_MAX_CMND        24
  62.  
  63. #define _GLIBTOP_PARAM_SIZE        16
  64.  
  65. typedef struct _glibtop_command        glibtop_command;
  66.  
  67. typedef struct _glibtop_response    glibtop_response;
  68. typedef union  _glibtop_response_union    glibtop_response_union;
  69.  
  70. struct _glibtop_command
  71. {
  72.     u_int64_t    command;
  73.     u_int64_t    size, data_size;
  74.     char        parameter [_GLIBTOP_PARAM_SIZE];
  75. };
  76.  
  77. union _glibtop_response_union
  78. {
  79.     glibtop_union    data;
  80.     glibtop_sysdeps    sysdeps;
  81. };
  82.  
  83. struct _glibtop_response
  84. {
  85.     int64_t offset;
  86.     u_int64_t size, data_size;
  87.     glibtop_response_union u;
  88. };
  89.  
  90. #define glibtop_call(p1, p2, p3, p4)    glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)
  91.  
  92. void *
  93. glibtop_call_l (glibtop *server, unsigned command, size_t send_size,
  94.         const void *send_buf, size_t recv_size, void *recv_buf);
  95.  
  96. void *
  97. glibtop_call_s (glibtop *server, unsigned command, size_t send_size,
  98.         const void *send_buf, size_t recv_size, void *recv_buf);
  99.  
  100. END_LIBGTOP_DECLS
  101.  
  102. #endif
  103.